<%@ page language="java"
	import="java.util.*,com.jiankang.entity.*,com.jiankang.util.*"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link href="<%=request.getContextPath()%>/css/style.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/jquery.js"></script>

<script type="text/javascript">
	$(document).ready(function() {
		$(".click").click(function() {
			$(".tip").fadeIn(200);
		});

		$(".tiptop a").click(function() {
			$(".tip").fadeOut(200);
		});

		$(".sure").click(function() {
			$(".tip").fadeOut(100);
		});

		$(".cancel").click(function() {
			$(".tip").fadeOut(100);
		});

	});
</script>


</head>


<body>
	<c:if test="${empty currentUser}">
		<jsp:include page="404.jsp" />
	</c:if>
	<c:if test="${!empty currentUser}">
		<div class="place">
			<span>位置：</span>
			<ul class="placeul">
				<li><a href="">首页</a></li>
				<li><a href="">数据表</a></li>
				<li><a href="">基本内容</a></li>
			</ul>
		</div>

		<div class="rightinfo">


			<table class="tablelist">
				<thead>
					<tr>
						<th>编号<i class="sort"><img
								src="<%=request.getContextPath()%>/images/px.gif" /></i></th>
						<th>手机号</th>
						<th>头像/名称</th>
						<th>年龄</th>
						<th>性别</th>
						<th>注册时间</th>
						<th>是否审核</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${users}" var="user" varStatus="status">
						<tr>
							<td>${user.id}</td>
							<td>${user.regphone}</td>
							<td><img src="<%=Data.URL.base%>upload/cache/${user.imgage}"
								width="20px" height="20px"> ${user.reguser}</td>
							<td>${user.age}</td>
							<td>${user.sex}</td>
							<td><fmt:formatDate value="${user.time}" type="date"
									pattern="yyyy-MM-dd HH:mm:ss" /></td>
							<td>通过</td>
							<td><a onclick="return confirm('您确定要删除吗？');"
								href="${pageContext.request.contextPath }/user/delete/${user.id}"
								class="tablelink"> 删除</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div class="pagin">
				<div class="message">
					共<i class="blue">${page.totalPageCount}</i>页，当前显示第&nbsp;<i
						class="blue">${page.pageNow}&nbsp;</i>页
				</div>
				<ul class="paginList">
					<li class="paginItem"><a
						href="${pageContext.request.contextPath }/user/listusers?pageNow=1">首页</a></li>
					<c:choose>
						<c:when test="${page.pageNow - 1 > 0}">
							<li class="paginItem"><a
								href="${pageContext.request.contextPath }/user/listusers?pageNow=${page.pageNow - 1}"></a><span
								class="pagepre"></span></li>

						</c:when>
						<c:when test="${page.pageNow - 1 <= 0}">
							<li class="paginItem"><a
								href="${pageContext.request.contextPath }/user/listusers?pageNow=1"></a><span
								class="pagepre"></span></li>
						</c:when>
					</c:choose>



					<c:choose>
						<c:when test="${page.pageNow + 1 < page.totalPageCount}">
							<li class="paginItem"><a
								href="${pageContext.request.contextPath }/user/listusers?pageNow=${page.pageNow + 1}"></a><span
								class="pagenxt"></span></li>
						</c:when>
						<c:when test="${page.pageNow + 1 >= page.totalPageCount}">
							<li class="paginItem"><a
								href="${pageContext.request.contextPath }/user/listusers?pageNow=${page.totalPageCount}"></a><span
								class="pagenxt"></span></li>
						</c:when>
					</c:choose>
					<li class="paginItem"><a
						href="${pageContext.request.contextPath }/user/listusers?pageNow=${page.totalPageCount}">尾页</a></li>
				</ul>
			</div>


			<div class="tip">
				<div class="tiptop">
					<span>提示信息</span><a></a>
				</div>

				<div class="tipinfo">
					<span><img
						src="<%=request.getContextPath()%>/images/ticon.png" /></span>
					<div class="tipright">
						<p>是否确认对信息的修改 ？</p>
						<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
					</div>
				</div>

				<div class="tipbtn">
					<input name="" type="button" class="sure" value="确定" />&nbsp; <input
						name="" type="button" class="cancel" value="取消" />
				</div>

			</div>
		</div>


		<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	

	</script>
	</c:if>
</body>
</html>
